{template 'common/header'}

<style>
    .label{line-height: 2}
    .danger{position: relative}
</style>
<div class="panel panel-default">
    <div class="panel-heading">筛选</div>
    <div class="panel-body">
        <form action="./index.php" method="get" class="form-horizontal" role="form" id="form">
            <input type="hidden" name="c" value="site">
            <input type="hidden" name="a" value="entry">
            <input type="hidden" name="m" value="orange_storemanage">
            <input type="hidden" name="do" value="storemanage">
            <input type="hidden" name="token" value="{$_W['token']}">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">店铺名[模糊搜索]</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control" name="storename" value="{$_GPC['storename']}" />
                </div>
                <div class="pull-right col-xs-12 col-sm-3 col-md-2 col-lg-2">
                    <input type="submit" class="btn btn-primary span3" name="submit" value="提交" />
                </div>
            </div>
        </form>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-body table-responsive">
        <table class="table table-hover">
            <thead>
            <tr>
                <th width="150">id</th>
                <th width="150">店铺名称</th>
                <th width="300">店铺属性</th>
                <!--<th width="150">店铺图</th>-->
                <th width="150">创建时间</th>
                <th width="100" class="text-right">操作</th>
            </tr>
            </thead>
            {loop $list $row}

            <tr {if $row['is_birth'] == 1}class="danger"{/if}>
            <td>{$row['id']}</td>

            <td>{$row['storename']}</td>

               <td>
                   {php $attrList = $this->getStoreAttrList($row['id']);}

                   {if $attrList == ''}
                        暂无标签
                   {else}
                       {loop $attrList $attr}
                       <span class="label label-primary">{$attr['value']}</span>
                       {/loop}
                   {/if}
               </td>
            <!--<td><img style="width: 40px;height: 40px" src="{php echo tomedia($row['storepic']);}" alt=""></td>-->
            <td>{php echo date('Y-m-d', $row['create_time']);}</td>

            <td class="text-right">

                <div class="btn-group" style="margin-bottom: 5px">
                    <a href="{php echo $this->createWebUrl('editstore', array('op' => 'edit','update_store_id'=>$row['id']));}" title="编辑店铺" class="btn btn-default">编辑店铺</a>
                </div>

                <br>
            </td>
            </tr>
            {/loop}
        </table>
    </div>
</div>
{$pager}
